﻿<%@ Page Title="Tổng chi theo khách hàng" Language="C#" MasterPageFile="~/Admin.master"
    AutoEventWireup="true" CodeFile="BCTongChiTheoKH.aspx.cs" Inherits="BCTongChiTheoKH" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="up1" runat="server">
        <ContentTemplate>
            <div class="panel panel-success margin">
                <div class="panel-heading">
                    <h3 class="panel-title">
                        Báo cáo tổng chi theo khách hàng</h3>
                </div>
                <div class="panel-body">
                    <div>
                        <asp:HiddenField ID="hdTuNgay" runat="server" />
                        <asp:HiddenField ID="hdDenNgay" runat="server" />
                    </div>
                    <div style="width: 100%; margin-top: 0px; overflow-x: auto;" class="wrapper">
                        <asp:DropDownList ID="dlThang" runat="server" Width="150px" AutoPostBack="true" CssClass="form-control"
                            OnSelectedIndexChanged="dlThang_SelectedIndexChanged">
                        </asp:DropDownList>
                        <asp:DropDownList ID="dlNam" runat="server" Width="110px" CssClass="form-control">
                        </asp:DropDownList>
                        <asp:TextBox ID="txtTuNgay" runat="server" placeholder="Từ ngày" Visible="true" Width="100px"
                            CssClass="form-control"></asp:TextBox>&nbsp;
                        <asp:TextBox ID="txtDenNgay" runat="server" placeholder="Đến ngày" AutoPostBack="true"
                            Visible="true" Width="100px" CssClass="form-control"></asp:TextBox>
                        <asp:DropDownList ID="drnhacungcap" Width="200px" CssClass="form-control" runat="server"
                            DataTextField="TenNCC" DataValueField="IDs">
                        </asp:DropDownList>
                        <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtTuNgay"
                            Format="dd/MM/yyyy">
                        </cc1:CalendarExtender>
                        <cc1:CalendarExtender ID="CalendarExtender3" runat="server" TargetControlID="txtDenNgay"
                            Format="dd/MM/yyyy">
                        </cc1:CalendarExtender>
                        <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender9" runat="server" FilterType="Custom,Numbers"
                            TargetControlID="txtTuNgay" ValidChars="/-" />
                        <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender10" runat="server" FilterType="Custom,Numbers"
                            TargetControlID="txtDenNgay" ValidChars="/-" />
                        <asp:Button ID="btnXem" CssClass="btn btn-warning" runat="server" Text="Tìm kiếm"
                            OnClick="btnXem_Click" />
                        <asp:Button ID="btnIn" CssClass="btn btn-primary" runat="server" Text="Xuất báo cáo"
                            OnClick="btnIn_Click" />
                        <asp:GridView ID="GV" Width="99%" runat="server" AutoGenerateColumns="false" BackColor="White"
                            Visible="false" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="1"
                            EmptyDataText="Không có dữ liệu nào" ShowFooter="true" CssClass="form-control withall">
                            <Columns>
                                <asp:BoundField DataField="NUMBER" HeaderText="STT" ItemStyle-HorizontalAlign="Center" />
                                <asp:BoundField DataField="TenNCC" HeaderText="Bên nhận tiền" ItemStyle-CssClass="padding"
                                    ItemStyle-HorizontalAlign="Left" />
                                <asp:BoundField DataField="tienthanhtoankitruocvat" HeaderText="Tổng chi kì trước Có VAT"
                                    ItemStyle-HorizontalAlign="Right" DataFormatString="{0:0,0}" />
                                <asp:BoundField DataField="tienthanhtoankitruockhongvat" HeaderText="Tổng chi kì trước không VAT"
                                    ItemStyle-HorizontalAlign="Right" DataFormatString="{0:0,0}" />
                                <asp:BoundField DataField="tongthanhtoankitruoc" HeaderText="Tổng chi kì trước" ItemStyle-HorizontalAlign="Right"
                                    DataFormatString="{0:0,0}" />
                                <asp:BoundField DataField="tienthanhtoankinayvat" HeaderText="Tổng chi cuối kì có VAT"
                                    ItemStyle-HorizontalAlign="Right" DataFormatString="{0:0,0}" />
                                <asp:BoundField DataField="tienthanhtoankinaykhongvat" HeaderText="Tổng chi cuối kì không VAT"
                                    ItemStyle-HorizontalAlign="Right" DataFormatString="{0:0,0}" />
                                <asp:BoundField DataField="tongthanhtoankinay" HeaderText="Tổng chi cuối kì" ItemStyle-HorizontalAlign="Right"
                                    DataFormatString="{0:0,0}" />
                            </Columns>
                            <FooterStyle BackColor="White" ForeColor="#000066" Font-Bold="True" HorizontalAlign="Right" />
                            <HeaderStyle BackColor="White" Font-Bold="True" ForeColor="Black" Height="30px" />
                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                            <RowStyle BackColor="White" ForeColor="#000066" Height="30px" />
                            <SelectedRowStyle BackColor="Lavender" Font-Bold="false" />
                        </asp:GridView>
                    </div>
                    <div style="margin: 5px;">
                        <asp:Button ID="btnFirst" runat="server" Text="Đầu" CssClass="btn btn-primary" OnClick="btnFirst_Click" />
                        <asp:Button ID="btnPre" runat="server" Style="margin-left: 5px;" Text="Trước" CssClass="btn btn-primary"
                            OnClick="btnPre_Click" />
                        <asp:Button ID="btnNext" runat="server" Style="margin-left: 5px;" Text="Sau" CssClass="btn btn-warning"
                            OnClick="btnNext_Click" />
                    </div>
                    <div style="margin: 5px;">
                        <asp:Button ID="Button1" runat="server" Visible="false" Text="Đầu" CssClass="btn btn-primary"
                            OnClick="Button1_Click" />
                        <asp:Button ID="Button2" runat="server" Visible="false" Style="margin-left: 5px;"
                            Text="Trước" CssClass="btn btn-primary" OnClick="Button2_Click" />
                        <asp:Button ID="Button3" runat="server" Visible="false" Style="margin-left: 5px;"
                            Text="Sau" CssClass="btn btn-warning" OnClick="Button3_Click" />
                    </div>
                </div>
            </div>
        </ContentTemplate>
         <Triggers>
            <asp:PostBackTrigger ControlID="btnIn" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
